@import '~antd/es/style/themes/default.less';

@bodyPadding: 24px 16px;
@margin: 24px;

.home-base {
  position: relative;
  padding: @bodyPadding;
  background-color: #fff;
}

.home-guide {
  margin-bottom: @margin;
  padding: @bodyPadding;
  background-color: #fff;

  .home-guide-items {
    display: grid;
    grid-column-gap: 56px;
  }
}

.home-guide-item {
  position: relative;
  padding: 16px;
  background: linear-gradient(135.62deg, #f6f7fd 22.27%, rgba(255, 255, 255, 0.86) 91.82%);
  border-radius: 2px;
  box-shadow: 0 4px 18px #efefef;
  .state {
    position: relative;
    padding-left: 8px;
    &::before {
      position: absolute;
      top: 7px;
      left: 0;
      display: inline-block;
      width: 6px;
      height: 6px;
      margin-right: 2px;
      content: '';
    }
    &.normal::before {
      background: #85a5ff;
    }
    &.notActive::before {
      background: #f29b55;
    }
    &.stopped::before {
      background: #c4c4c4;
    }
  }

  &.pointer {
    cursor: pointer;
  }

  .item-english {
    color: #4f4f4f;
  }

  .item-title {
    margin: 20px 0;
    color: @text-color;
    font-weight: 700;
    font-size: 20px;
  }

  .item-index {
    position: absolute;
    right: 10%;
    bottom: 0;
  }

  .item-index-echarts {
    .item-index;

    right: 12px;
    bottom: 5%;
    z-index: 0;
    width: 50%;
  }
}

.home-title {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-left: 18px;
  font-weight: bold;
  font-size: 18px;

  &::after {
    position: absolute;
    top: 50%;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: @primary-color;
    border: 1px solid #b4c0da;
    transform: translateY(-50%);
    content: ' ';
  }

  .home-title-english {
    position: absolute;
    top: 30px;
    color: rgba(0, 0, 0, 0.3);
    font-size: 12px;
  }
}

.home-body {
  .home-base;

  min-height: 444px;
  margin-bottom: @margin;
  padding-bottom: 26.5%;
  overflow: hidden;
  border-bottom: 1px solid #2f54eb;

  .home-body-img {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    height: 100%;

    > img {
      width: 100%;
      height: 100%;
    }
  }
}

.home-statistics {
  .home-base;

  .home-statistics-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

.step-item-after {
  position: absolute;
  top: 50%;
  right: -60px;
  width: 60px;
  height: 40px;
  transform: translateY(-50%);
  content: ' ';
}

.home-step {
  .home-base;

  .home-step-items {
    display: grid;
    grid-column-gap: 66px;

    .step-item {
      display: flex;
      flex-direction: column;

      .step-item-title {
        position: relative;
        padding: 16px 24px;
        color: #333;
        font-weight: bold;
        font-size: 14px;
        background-color: #f8f9fd;
        cursor: pointer;

        .step-item-img {
          position: absolute;
          top: 0;
          right: 0;
          z-index: 1;
          height: 100%;

          img {
            height: 100%;
          }
        }

        > span {
          position: relative;
          z-index: 2;
        }
      }

      .step-item-content {
        flex-grow: 1;
        height: auto;
        padding: 24px;
        border-right: 1px solid #e5edf4;
        border-bottom: 1px solid #e5edf4;
        border-left: 1px solid #e5edf4;
      }
    }
  }
}

.step-bar {
  position: relative;

  &.arrow-1 {
    &:not(:last-child) {
      &::after {
        .step-item-after;

        background: url('/images/home/arrow-1.png') no-repeat center;
      }
    }
  }

  &.arrow-2 {
    &:not(:last-child) {
      &::after {
        .step-item-after;

        background: url('/images/home/arrow-2.png') no-repeat center;
      }
    }
  }
}
